<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>simCreateOctree</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1><a href="../apiOverview.htm">Regular API</a> function</h1>
<h3 class=subsectionBar><a name="simCreateOctree" id="simCreateOctree"></a>simCreateOctree / sim.createOctree </h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Creates an empty <a href="../octrees.htm">OC tree</a>. See also <a href="simRemoveObject.htm">sim.removeObject</a> and the other <a href="../apiFunctionListCategory.htm#octree">OC tree related functions</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn>simInt simCreateOctree(simFloat voxelSize,simInt options,simFloat pointSize,simVoid* reserved)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
<div><strong>voxelSize</strong>: the size of the voxels</div>
<div><strong>options</strong>: bit-coded:</div>
<div class=tab>bit0 set (1): voxels have random colors</div>
<div class=tab>bit1 set (2): show OC tree structure</div>
<div class=tab>bit2 set (4): show points instead of voxels</div>
<div class=tab>bit3 set (8): reserved. keep unset</div>
<div class=tab>bit4 set (16): color is emissive</div>
<div><strong>pointSize</strong>: the size of the points in pixels, when voxels are rendered with points</div>
<div><strong>reserved</strong>: reserved for future extensions. Set to nullptr</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div>-1 if operation was not successful, otherwise the handle of the OC tree
</div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>number handle=sim.createOctree(number voxelSize,number options,number pointSize)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div>Similar to the C-function counterpart</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>Similar to the C-function counterpart</div>
</td> 
</tr> 
</table> 

<br>
<p><a href="../apiFunctions.htm">All regular API functions on one page</a></p>
<br>
<br>
</td>
</tr>
</table>
</div>
</body>
</html>
